<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	request.setAttribute("contextPath", request.getContextPath());
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<base href="<%=basePath%>">

<title>Edit book page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<style>
.edit{
position:absolute;
top:30px;
left:300px;
margin-left:auto;
margin-right:auto;
width:60%;
}
.header{
}
</style>
</head>

<body>
	<div class="header">
	</div>
	<div class="edit">
		<form id="edit" name="edit" action="book/modifyBookDo" method="post">
			<p>书名：<input type="text" name="name" value="${book.name }"/></p>
			<p>类别：<select id="types" name="typeId">
				<c:forEach items="${booktypes}" var="type">
					<option value="${type.id}">${type.name}</option>
				</c:forEach>
				</select>
			</p>
			<p>作者：<input type="text" name="author" value="${book.author }"/></p>
			<p>出版社：<input type="text" name="press" value="${book.press }"/></p>
			<p>进货价格：<input type="text" name="inPrice" value="${book.inPrice }"/></p>
			<p>出售价格：<input type="text" name="outPrice" value="${book.outPrice }"/></p>
			<p>库存量：<input type="text" name="storageVolume" value="${book.storageVolume }"/></p>
			<p>书籍描述：<input value="${book.description }"/></p>
			<input type="hidden" name="id"value="${book.id }">
			<input type="submit" value="提交更改"/>
		</form>
	</div>
</body>
</html>